Skip to content

ADFA-5121: Remove dead UseSytemShell preference and unused setting - #1668

Merged
davidschachterADFA merged 4 commits into
stagefrom
task/ADFA-5121-remove-dead-system-shell-pref
Aug 13, 2026
Merged

ADFA-5121: Remove dead UseSytemShell preference and unused setting#1668
davidschachterADFA merged 4 commits into
stagefrom
task/ADFA-5121-remove-dead-system-shell-pref

Conversation

@davidschachterADFA

Copy link
Copy Markdown
Collaborator

Summary

UseSytemShell (a preference row for toggling /system/bin/sh in the terminal) was never instantiated anywhere — no addPreference(UseSytemShell()) call exists in any screen builder, so it was unreachable from the Preferences UI. The setting it read/wrote (GeneralPreferences.useSystemShell / TERMINAL_USE_SYSTEM_SHELL) was likewise never consulted anywhere else in the codebase — a fully orphaned feature, found while auditing Preferences for ADFA-5088.

  • Removed the UseSytemShell class, TERMINAL_USE_SYSTEM_SHELL constant, and useSystemShell property.
  • Removed title_default_shell/msg_default_shell strings from all 13 locale strings.xml files (used only by this row). The shared ic_bash_commands drawable is left alone — it's also used by GradleCommands.

Test plan

  • :app:compileV8DebugKotlin, :preferences:compileV8DebugKotlin succeed
  • spotlessCheck passes
  • Confirmed via repo-wide grep that no other code references the removed class, constant, property, or strings

🤖 Generated with Claude Code

UseSytemShell was never instantiated anywhere - no addPreference(UseSytemShell()) call exists in any screen builder, so it was unreachable from the Preferences UI. The setting it read/wrote (GeneralPreferences.useSystemShell / TERMINAL_USE_SYSTEM_SHELL) was likewise never consulted anywhere else in the codebase. Remove the class, the backing constant and property, and the title/summary strings across all 13 locale files (used only by this row).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d3f0b486-e79f-4ee9-94c2-10e515f1d597

📥 Commits

Reviewing files that changed from the base of the PR and between bf46d5e and 2771fee.

📒 Files selected for processing (15)
  • app/src/main/java/com/itsaky/androidide/preferences/generalPrefExts.kt
  • preferences/src/main/java/com/itsaky/androidide/preferences/internal/GeneralPreferences.kt
  • resources/src/main/res/values-ar-rSA/strings.xml
  • resources/src/main/res/values-bn-rIN/strings.xml
  • resources/src/main/res/values-de-rDE/strings.xml
  • resources/src/main/res/values-es-rES/strings.xml
  • resources/src/main/res/values-fr-rFR/strings.xml
  • resources/src/main/res/values-hi-rIN/strings.xml
  • resources/src/main/res/values-in-rID/strings.xml
  • resources/src/main/res/values-pt-rBR/strings.xml
  • resources/src/main/res/values-ro-rRO/strings.xml
  • resources/src/main/res/values-ru-rRU/strings.xml
  • resources/src/main/res/values-tr-rTR/strings.xml
  • resources/src/main/res/values-zh-rCN/strings.xml
  • resources/src/main/res/values/strings.xml
💤 Files with no reviewable changes (14)
  • resources/src/main/res/values-ar-rSA/strings.xml
  • resources/src/main/res/values-pt-rBR/strings.xml
  • resources/src/main/res/values-es-rES/strings.xml
  • resources/src/main/res/values-ro-rRO/strings.xml
  • resources/src/main/res/values-de-rDE/strings.xml
  • resources/src/main/res/values/strings.xml
  • resources/src/main/res/values-in-rID/strings.xml
  • resources/src/main/res/values-bn-rIN/strings.xml
  • preferences/src/main/java/com/itsaky/androidide/preferences/internal/GeneralPreferences.kt
  • resources/src/main/res/values-hi-rIN/strings.xml
  • resources/src/main/res/values-fr-rFR/strings.xml
  • resources/src/main/res/values-ru-rRU/strings.xml
  • resources/src/main/res/values-tr-rTR/strings.xml
  • resources/src/main/res/values-zh-rCN/strings.xml

📝 Walkthrough
  • Removed the unused UseSytemShell preference and its backing setting.
  • Removed GeneralPreferences.TERMINAL_USE_SYSTEM_SHELL and useSystemShell.
  • Removed title_default_shell and msg_default_shell from all 13 locale files.
  • Retained ic_bash_commands because GradleCommands still uses it.
  • Verified Kotlin compilation, spotlessCheck, and the absence of remaining references.
  • Risk: Formatting changes in generalPrefExts.kt increase the review surface without changing behavior.

Walkthrough

The system shell preference was removed from the preference declarations and storage contract. Its title and description were removed from localized resources. Remaining preference declarations were re-indented without behavior changes.

Changes

System shell preference removal

Layer / File(s) Summary
Remove preference contract and implementation
app/src/main/java/com/itsaky/androidide/preferences/generalPrefExts.kt, preferences/src/main/java/com/itsaky/androidide/preferences/internal/GeneralPreferences.kt
The UseSytemShell preference, TERMINAL_USE_SYSTEM_SHELL, and useSystemShell were removed. Existing preference code was re-indented.
Remove system shell strings
resources/src/main/res/values*/strings.xml
The title_default_shell and msg_default_shell resources were removed from the affected locales.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 2771f

This change removes an unreachable preference and unused setting without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review.

Suggested reviewers: daniel-adfa

Poem

A rabbit trims the shell-setting trail,
Removes old words from every locale.
The preferences stand neat and bright,
With system-shell hooks gone from sight.
Hop, hop—clean code takes flight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the removal of the unused UseSytemShell preference and its backing setting.
Description check ✅ Passed The description directly explains the removed preference, related resources, rationale, and reported validation steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/ADFA-5121-remove-dead-system-shell-pref

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@davidschachterADFA
davidschachterADFA merged commit b516316 into stage Aug 13, 2026
4 checks passed
@davidschachterADFA
davidschachterADFA deleted the task/ADFA-5121-remove-dead-system-shell-pref branch August 13, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants